package com.springcloud.authentication.modules.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
 * 权限表
 * @author Administrator
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "sys_permission")//对应数据库表名
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class SysPermission {
	
	
	@Id
	@GeneratedValue(generator = "jpa-uuid")
	@Column(length = 32)
	private String id; //主键id

	@Column
	private String name; //权限名称
	
//	@ManyToOne
//    @JoinColumn(name = "id",insertable = false, updatable = false)
//	private SysRole sysRole;
}
